package com.example.flowermall.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.example.flowermall.entity.OrderItem;
import com.example.flowermall.mapper.OrderItemMapper;
import com.example.flowermall.service.IOrderItemService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author xiaoman
 * @since 2023-09-06
 */
@Service
public class OrderItemServiceImpl extends ServiceImpl<OrderItemMapper, OrderItem> implements IOrderItemService {
    @Autowired
    OrderItemMapper orderItemMapper;
    @Override
    public List<OrderItem> getByOrderId(String orderId) {
        LambdaQueryWrapper<OrderItem> queryWrapper=new LambdaQueryWrapper<>();
        queryWrapper.eq(OrderItem::getOrderId,orderId);
        return orderItemMapper.selectList(queryWrapper);
    }
}
